<template>
  <div class="charts">
    <div class="header">
      <span>{{ title }}</span>
      <i class="el-icon-warning-outline" />
    </div>
    <div class="value">{{ value }}</div>
    <div class="main">
      <slot />
    </div>
    <div class="footer">
      <slot name="footer" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Card',
  props: {
    title: {
      type: String,
      default: ''
    },
    value: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.charts {
  width: 100%;
  box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
  padding: 20px;
}
.header {
  display: flex;
  justify-content: space-between;
  span,
  i {
    color: #8c8c8c;
    font-size: 14px;
  }
}
.value {
  margin: 10px 0;
  font-size: 30px;
  color: #262626;
}
.main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
  padding-bottom: 10px;
  height: 50px;
  border-bottom: 1px solid #f0f0f0;
}
.footer {
  color: #303133;
}
</style>
